package com.gy.edu.news.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.gy.edu.R;

/**
 * Created by 高岳 on 2016/12/22.
 * Describe:
 */
public class NewsHomeAdapter extends BaseAdapter {

    private Context context;
    private String[] titles = new String[]{"习近平：把思想政治工作贯穿教育教学全过程","李克强：切实把职业教育摆在更加突出的位置",
    "全国高校实践育人暨创新创业现场推进会召开","现场作业凸显技能：全国包装设计职业技能现场大赛举办","增强自我发展能力——新疆建立职业教育对口帮扶长效机制",
    "高职院校财务人员探讨财务内部控制——钱怎么花才安全？","现代职业教育发展推进会召开","2017届全国普通高校毕业生就业创业工作网络视频会议召开",
    "李克强：抓紧建立公开透明的职业资格目录清单","教育部与六省（区）签署“一带一路”教育行动国际合作备忘录"};

    public NewsHomeAdapter(Context context){
        this.context = context;
    }

    @Override
    public int getCount() {
        return 10;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        convertView = View.inflate(context, R.layout.adapter_news_home,null);
        TextView tvTitle = (TextView) convertView.findViewById(R.id.adapter_news_title);
        tvTitle.setText(titles[position]+"");
        return convertView;
    }
}
